<template>
  <div class="login">
    <!-- 头部 -->
    <XtxHeader >欢迎登录</XtxHeader>
  <!-- 登录区域 -->
    <XtxMain />
    <!-- 底部 -->
    <XtxFooter />
  </div>

</template>

<script>
import XtxHeader from './components/header.vue'
import XtxFooter from './components/footer.vue'
import XtxMain from './components/main.vue'
import { useStore } from 'vuex'
import { useRoute } from 'vue-router'
export default {
  name: 'Login',
  components: {
    XtxHeader,
    XtxFooter,
    XtxMain
  },
  setup () {
    // 存储回调地址
    const store = useStore()
    const route = useRoute()
    store.commit('user/setRedirectUrl', route.query.redirectUrl || '/')
  }
}
</script>

<style scoped lang="less">
.login {
  background-color: #fff;
}
</style>
